3.57 \(\int \frac{\csc ^2(c+d x)}{a+b \tan (c+d x)} \, dx\)

Optimal. Leaf size=50 \[ -\frac{b \log (\tan (c+d x))}{a^2 d}+\frac{b \log (a+b \tan (c+d x))}{a^2 d}-\frac{\cot (c+d x)}{a d} \]

[Out]

-(Cot[c + d*x]/(a*d)) - (b*Log[Tan[c + d*x]])/(a^2*d) + (b*Log[a + b*Tan[c + d*x]])/(a^2*d)

________________________________________________________________________________________

Rubi [A]  time = 0.0602185, antiderivative size = 50, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 21, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.095, Rules used = {3516, 44} \[ -\frac{b \log (\tan (c+d x))}{a^2 d}+\frac{b \log (a+b \tan (c+d x))}{a^2 d}-\frac{\cot (c+d x)}{a d} \]

Antiderivative was successfully verified.

[In]

Int[Csc[c + d*x]^2/(a + b*Tan[c + d*x]),x]

[Out]

-(Cot[c + d*x]/(a*d)) - (b*Log[Tan[c + d*x]])/(a^2*d) + (b*Log[a + b*Tan[c + d*x]])/(a^2*d)

Rule 3516

Int[sin[(e_.) + (f_.)*(x_)]^(m_)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Dist[b/f, Subst[Int
[(x^m*(a + x)^n)/(b^2 + x^2)^(m/2 + 1), x], x, b*Tan[e + f*x]], x] /; FreeQ[{a, b, e, f, n}, x] && IntegerQ[m/
2]

Rule 44

Int[((a_) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d*
x)^n, x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - a*d, 0] && ILtQ[m, 0] && IntegerQ[n] &&  !(IGtQ[n, 0] && L
tQ[m + n + 2, 0])

Rubi steps

\begin{align*} \int \frac{\csc ^2(c+d x)}{a+b \tan (c+d x)} \, dx &=\frac{b \operatorname{Subst}\left (\int \frac{1}{x^2 (a+x)} \, dx,x,b \tan (c+d x)\right )}{d}\\ &=\frac{b \operatorname{Subst}\left (\int \left (\frac{1}{a x^2}-\frac{1}{a^2 x}+\frac{1}{a^2 (a+x)}\right ) \, dx,x,b \tan (c+d x)\right )}{d}\\ &=-\frac{\cot (c+d x)}{a d}-\frac{b \log (\tan (c+d x))}{a^2 d}+\frac{b \log (a+b \tan (c+d x))}{a^2 d}\\ \end{align*}

Mathematica [A]  time = 0.130935, size = 47, normalized size = 0.94 \[ \frac{b (\log (a \cos (c+d x)+b \sin (c+d x))-\log (\sin (c+d x)))-a \cot (c+d x)}{a^2 d} \]

Antiderivative was successfully verified.

[In]

Integrate[Csc[c + d*x]^2/(a + b*Tan[c + d*x]),x]

[Out]

(-(a*Cot[c + d*x]) + b*(-Log[Sin[c + d*x]] + Log[a*Cos[c + d*x] + b*Sin[c + d*x]]))/(a^2*d)

________________________________________________________________________________________

Maple [A]  time = 0.062, size = 53, normalized size = 1.1 \begin{align*} -{\frac{1}{ad\tan \left ( dx+c \right ) }}-{\frac{b\ln \left ( \tan \left ( dx+c \right ) \right ) }{{a}^{2}d}}+{\frac{b\ln \left ( a+b\tan \left ( dx+c \right ) \right ) }{{a}^{2}d}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(csc(d*x+c)^2/(a+b*tan(d*x+c)),x)

[Out]

-1/d/a/tan(d*x+c)-b*ln(tan(d*x+c))/a^2/d+b*ln(a+b*tan(d*x+c))/a^2/d

________________________________________________________________________________________

Maxima [A]  time = 1.06775, size = 63, normalized size = 1.26 \begin{align*} \frac{\frac{b \log \left (b \tan \left (d x + c\right ) + a\right )}{a^{2}} - \frac{b \log \left (\tan \left (d x + c\right )\right )}{a^{2}} - \frac{1}{a \tan \left (d x + c\right )}}{d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(d*x+c)^2/(a+b*tan(d*x+c)),x, algorithm="maxima")

[Out]

(b*log(b*tan(d*x + c) + a)/a^2 - b*log(tan(d*x + c))/a^2 - 1/(a*tan(d*x + c)))/d

________________________________________________________________________________________

Fricas [A]  time = 2.05537, size = 246, normalized size = 4.92 \begin{align*} \frac{b \log \left (2 \, a b \cos \left (d x + c\right ) \sin \left (d x + c\right ) +{\left (a^{2} - b^{2}\right )} \cos \left (d x + c\right )^{2} + b^{2}\right ) \sin \left (d x + c\right ) - b \log \left (-\frac{1}{4} \, \cos \left (d x + c\right )^{2} + \frac{1}{4}\right ) \sin \left (d x + c\right ) - 2 \, a \cos \left (d x + c\right )}{2 \, a^{2} d \sin \left (d x + c\right )} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(d*x+c)^2/(a+b*tan(d*x+c)),x, algorithm="fricas")

[Out]

1/2*(b*log(2*a*b*cos(d*x + c)*sin(d*x + c) + (a^2 - b^2)*cos(d*x + c)^2 + b^2)*sin(d*x + c) - b*log(-1/4*cos(d
*x + c)^2 + 1/4)*sin(d*x + c) - 2*a*cos(d*x + c))/(a^2*d*sin(d*x + c))

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\csc ^{2}{\left (c + d x \right )}}{a + b \tan{\left (c + d x \right )}}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(d*x+c)**2/(a+b*tan(d*x+c)),x)

[Out]

Integral(csc(c + d*x)**2/(a + b*tan(c + d*x)), x)

________________________________________________________________________________________

Giac [A]  time = 1.20827, size = 81, normalized size = 1.62 \begin{align*} \frac{\frac{b \log \left ({\left | b \tan \left (d x + c\right ) + a \right |}\right )}{a^{2}} - \frac{b \log \left ({\left | \tan \left (d x + c\right ) \right |}\right )}{a^{2}} + \frac{b \tan \left (d x + c\right ) - a}{a^{2} \tan \left (d x + c\right )}}{d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(d*x+c)^2/(a+b*tan(d*x+c)),x, algorithm="giac")

[Out]

(b*log(abs(b*tan(d*x + c) + a))/a^2 - b*log(abs(tan(d*x + c)))/a^2 + (b*tan(d*x + c) - a)/(a^2*tan(d*x + c)))/
d